{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="keywords" content="">
    <meta name="description" content="">

    <title> {{ request.session.user_name }},欢迎回来！</title>

    <link rel="shortcut icon" href="{% static 'login/favicon.ico' %}"> <link href="{% static 'login/css/bootstrap.min.css' %}" rel="stylesheet">
    <link href="{% static 'login/css/font-awesome.css' %}" rel="stylesheet">

    <link href="{% static 'login/css/animate.css' %}" rel="stylesheet">
    <link href="{% static 'login/css/style.css' %}" rel="stylesheet">
</head>
<body class="gray-bg">
    <a href="/logout/">
            <button type="button" class="btn btn-primary btn-rounded">登出</button>
    </a>
    <div class="wrapper wrapper-content  animated fadeInRight">
        <div class="row">
            <div class="col-sm-8">
                <div class="ibox">
                    <div class="ibox-content">
                        <span class="text-muted small pull-right">最后更新：<i class="fa fa-clock-o"></i>{% now "Y-m-d H:i" %}</span>
                        <h2>首页</h2>
                        <div class="input-group">
                            <input type="text" placeholder="查找试卷" class="input form-control">
                            <span class="input-group-btn">
                                        <button type="button" class="btn btn btn-primary"> <i class="fa fa-search"></i> 搜索</button>
                                </span>
                        </div>
                        <div class="clients-list">
                            <ul class="nav nav-tabs">
                                <span class="pull-right small text-muted">{{paper_count}}个试卷</span>
                                <li class="active"><a data-toggle="tab" href="#tab-1"> 未完成</a>
                                </li>
                                <li class=""><a data-toggle="tab" href="#tab-2"> 已完成</a>
                                </li>
                            </ul>
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <table class="table table-striped table-hover">
                                                <tbody>
                                                    {% for paper in paper_nofinish %}
                                                    <tr>
                                                        <td class="client-avatar"><img alt="image" src="{% static 'login/image/paper.jpg' %}"> </td>
                                                        <td><a href="{% url 'testsystem:paper' paper.id %}">{{paper.paper_text}}</a></td>
                                                        <td> 发布时间{{paper.pub_date}}</td>    
                                                    </tr>
                                                    {% endfor %}
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-2" class="tab-pane">
                                    <div class="full-height-scroll">
                                        <div class="table-responsive">
                                            <table class="table table-striped table-hover">
                                                <tbody>
                                                    {% for paper in score_list %}
                                                    <tr>
                                                        <td class="client-avatar"><img alt="image" src="{% static 'login/image/paper.jpg' %}"> </td>
                                                        <td><a href="{% url 'testsystem:paper' paper.paper_id.id %}">{{paper.paper_id.paper_text}}</a></td>
                                                        <td> 发布时间：{{paper.paper_id.pub_date}}</td>    
                                                    </tr>
                                                    {% endfor %}
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-4">
                <div class="ibox ">

                    <div class="ibox-content">
                        <div class="tab-content">
                            <div id="contact-1" class="tab-pane active">
                                <div class="row m-b-lg">
                                    <div class="col-lg-4 text-center">
                                        <h2>{{ request.session.user_name }}</h2>

                                        <div class="m-b-sm">
                                            <img alt="image" class="img-circle" src="{% static 'login/image/student.jpg' %}" style="width: 62px">
                                        </div>
                                    </div>
                                    <div class="col-lg-8">
                                        <h1>
                                            个人简介
                                        </h1><br>
                                        <h4>
                                            姓名：{{ request.session.user_name }}
                                        </h4><br>
                                        <h4>
                                            学号：{{ request.session.user_idcard }}
                                        </h4><br>
                                    </div>
                                </div>
                                <div class="client-detail">
                                    <div class="full-height-scroll">
                                        <br><br><br><br><br><br><br>
                                        <strong>显示成绩</strong>
                                                <ul class="list-group clear-list">
                                                    {% for score in score_list %}
                                                    <li class="list-group-item fist-item">
                                                        <span class="pull-right"> {{score.score}}</span> {{score.paper_id}}
                                                    </li>
                                                    {% endfor %}
                                                </ul>
                                            
                                        <hr/>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 全局js -->
    <script src="{% static 'login/js/jquery.min.js' %}"></script>
    <script src="{% static 'login/js/bootstrap.min.js' %}"></script>

    <script src="{% static 'login/js/plugins/slimscroll/jquery.slimscroll.min.js' %}"></script>

    <!-- 自定义js -->
    <script src="{% static 'login/js/content.js' %}"></script>

    <script>
        $(function () {
            $('.full-height-scroll').slimScroll({
                height: '100%'
            });
        });
    </script>

</body>

</html>
